﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<brjostagjof.Models.Children>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Breyta upplýsingum um barn
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Breyta upplýsingum um barn</h2>
    <% using (Html.BeginForm("EditChild", "MySite", FormMethod.Post, new { enctype = "multipart/form-data" }))
       {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <div class="editor-label">
                Nafn barns
            </div>
             <div class="editor-field">
                <%: Html.TextBoxFor(model => model.name)%>
                <%: Html.ValidationMessageFor(model => model.name)%>
            </div>

           <div class="editor-label">
                Velja Mynd
            </div>
            <div class="editor-field">
                <input type="file" name="files" id="file2" size="25"  />  
            </div>

            <div class="editor-label">
                Aldur í mánuðum
            </div>

             <div class="editor-field">
                <%: Html.TextBoxFor(model => model.age)%>
                <%: Html.ValidationMessageFor(model => model.age)%>
            </div>

             <div class="editor-label">
                Lýsing
            </div>
             <div class="editor-field">
                <%: Html.TextAreaFor(model => model.description, new { rows = "10", cols = "40" })%>
                <%: Html.ValidationMessageFor(model => model.description) %>
            </div>

            <div class="editor-field">
                 <%: Html.HiddenFor(model => model.ID)%>
            </div>
            <p>
                <input type="submit" value="Staðfesta" />
            </p>

         </fieldset>

    <% } %>

    <div>
        <span style="color:Red;">&raquo;&nbsp;</span><%: Html.ActionLink("Hætta við", "Index")%>
    </div>


</asp:Content>
